Skip to content

[Refunds] Update networking layer to support multiple tax rates #14002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented May 2, 2025

Closes: WOOMOB-394

Note

I'll handle merging myself, I want to make sure that the PR doesn't violate any detekt rules in FluxC module (after this PR), but I prefer to handle this after approval given that there are other PRs that depend on this branch.

Description

This PR updates the refunding networking layer to match what the API expects about taxes: we pass an array of taxes with the the applied rate IDs. For more information check pe5sF9-4eA-p2

Steps to reproduce

There are no logic changes in this PR, for testing steps, please check the next PR #14064

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@hichamboushaba hichamboushaba added type: task An internally driven task. feature: refunds Related to order refunds. labels May 2, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented May 2, 2025

1 Error
🚫 This PR is tagged with status: do not merge label(s).

Generated by 🚫 Danger

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-394-refunds-networking-update branch from 7f1b829 to 0578165 Compare May 2, 2025 11:31
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 2, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit9424a5b
Direct Downloadwoocommerce-wear-prototype-build-pr14002-9424a5b.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 2, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit9424a5b
Direct Downloadwoocommerce-prototype-build-pr14002-9424a5b.apk

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-394-refunds-networking-update branch from 0de75f6 to fe84ddb Compare May 14, 2025 18:13
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 45.12195% with 45 lines in your changes missing coverage. Please review.

Project coverage is 38.39%. Comparing base (16e91db) to head (9424a5b).
Report is 78 commits behind head on trunk.

Files with missing lines Patch % Lines
...rce/android/ui/payments/refunds/RefundsUiModels.kt 46.51% 23 Missing ⚠️
...dpress/android/fluxc/model/order/WCLineTaxEntry.kt 0.00% 7 Missing ⚠️
...ress/android/fluxc/persistence/WCRefundSqlUtils.kt 0.00% 7 Missing ⚠️
...org/wordpress/android/fluxc/model/order/FeeLine.kt 0.00% 2 Missing ⚠️
...dpress/android/fluxc/model/refunds/RefundMapper.kt 0.00% 2 Missing ⚠️
.../network/rest/wpcom/wc/refunds/RefundRestClient.kt 0.00% 2 Missing ⚠️
...s/android/fluxc/model/refunds/RefundRequestItem.kt 88.88% 1 Missing ⚠️
...org/wordpress/android/fluxc/store/WCRefundStore.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #14002   +/-   ##
=========================================
  Coverage     38.39%   38.39%           
- Complexity     9605     9606    +1     
=========================================
  Files          2125     2128    +3     
  Lines        117060   117134   +74     
  Branches      15030    15030           
=========================================
+ Hits          44947    44979   +32     
- Misses        67994    68036   +42     
  Partials       4119     4119           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hichamboushaba hichamboushaba marked this pull request as ready for review May 15, 2025 16:11
@hichamboushaba hichamboushaba added type: bug A confirmed bug. type: task An internally driven task. status: do not merge Dependent on another PR, ready for review but not ready for merge. and removed type: task An internally driven task. type: bug A confirmed bug. labels May 16, 2025
@hichamboushaba hichamboushaba added this to the 22.5 milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: refunds Related to order refunds. status: do not merge Dependent on another PR, ready for review but not ready for merge. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants